#include "stdafx.h"

#include "CameraComponent.h"

s64	CameraComponent::m_type = -1;
s64	CameraComponent::m_index = -1;

CameraComponent::CameraComponent() : IComponent("CameraComponent", m_type, m_index)
{
}

CameraComponent::~CameraComponent()
{
}

void CameraComponent::SetDeltaPosition(const Vector2D<s32>& position)
{
    m_position += position;
}

void CameraComponent::SetPosition(const Vector2D<s32>& position)
{
    m_position = position;
}

void CameraComponent::SetX(s32 x)
{
    m_position = Vector2D<s32>(x, GetPosition().GetY());
}

void CameraComponent::SetY(s32 y)
{
    m_position = Vector2D<s32>(GetPosition().GetX(), y);
}
